import { _decorator, BoxCollider2D, Collider2D, Component, find, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Prop')
export class Prop extends Component {

    private life:number = 1
    die(){
        this.life--
    }

    update(deltaTime: number) {
        if(this.life <= 0){
            this.node.destroy()
        }
    }
}


